package org.wmq.model.Entity;

import java.time.LocalDateTime;

public class MySimpleMap extends BaseEntity{
    private String url;
    private String name;
    private Byte mapType;
    private Byte mediumType;
    private LocalDateTime publicationTime;
    private LocalDateTime collectionTime;
    private String introduction;

    public MySimpleMap() {
    }

    public MySimpleMap(String url, String name, Byte mapType, Byte mediumType, LocalDateTime publicationTime, LocalDateTime collectionTime, String introduction) {
        this.url = url;
        this.name = name;
        this.mapType = mapType;
        this.mediumType = mediumType;
        this.publicationTime = publicationTime;
        this.collectionTime = collectionTime;
        this.introduction = introduction;
    }

    /**
     * 获取
     * @return url
     */
    public String getUrl() {
        return url;
    }

    /**
     * 设置
     * @param url
     */
    public void setUrl(String url) {
        this.url = url;
    }

    /**
     * 获取
     * @return name
     */
    public String getName() {
        return name;
    }

    /**
     * 设置
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * 获取
     * @return mapType
     */
    public Byte getMapType() {
        return mapType;
    }

    /**
     * 设置
     * @param mapType
     */
    public void setMapType(Byte mapType) {
        this.mapType = mapType;
    }

    /**
     * 获取
     * @return mediumType
     */
    public Byte getMediumType() {
        return mediumType;
    }

    /**
     * 设置
     * @param mediumType
     */
    public void setMediumType(Byte mediumType) {
        this.mediumType = mediumType;
    }

    /**
     * 获取
     * @return publicationTime
     */
    public LocalDateTime getPublicationTime() {
        return publicationTime;
    }

    /**
     * 设置
     * @param publicationTime
     */
    public void setPublicationTime(LocalDateTime publicationTime) {
        this.publicationTime = publicationTime;
    }

    /**
     * 获取
     * @return collectionTime
     */
    public LocalDateTime getCollectionTime() {
        return collectionTime;
    }

    /**
     * 设置
     * @param collectionTime
     */
    public void setCollectionTime(LocalDateTime collectionTime) {
        this.collectionTime = collectionTime;
    }

    /**
     * 获取
     * @return introduction
     */
    public String getIntroduction() {
        return introduction;
    }

    /**
     * 设置
     * @param introduction
     */
    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public String toString() {
        return "MySimpleMap{url = " + url + ", name = " + name + ", mapType = " + mapType + ", mediumType = " + mediumType + ", publicationTime = " + publicationTime + ", collectionTime = " + collectionTime + ", introduction = " + introduction + "}";
    }

    public void update(MySimpleMap that) {
        if (that == null){
            return;
        }
        if (that.getUrl() != null && !that.getUrl().equals("")){
            this.url = that.getUrl();
        }
        if (that.getName() != null && !that.getName().equals("")){
            this.name = that.getName();
        }
        if (that.getMapType() != null){
            this.mapType = that.getMapType();
        }
        if (that.getMediumType() != null){
            this.mediumType = that.getMediumType();
        }
        if (that.getPublicationTime() != null){
            this.publicationTime = that.getPublicationTime();
        }
        if (that.getCollectionTime() != null){
            this.collectionTime = that.getCollectionTime();
        }
        if (that.getIntroduction() != null && !that.getIntroduction().equals("")){
            this.introduction = that.getIntroduction();
        }
    }
}
